package org.liziyi.huffman.gui;

import javax.swing.*;
import javax.swing.table.DefaultTableCellRenderer;

/**
 * @author liziyi
 */
public class CharMapComponent {
    private JTable charMapJTable;
    private JPanel baseJPanel;

    public JTable getCharMapJTable() {
        return charMapJTable;
    }

    public JPanel getBaseJPanel() {
        return baseJPanel;
    }

    private void createUIComponents() {
        charMapJTable = new JTable();
        DefaultTableCellRenderer defaultTableCellRenderer = new DefaultTableCellRenderer();
        defaultTableCellRenderer.setHorizontalAlignment(SwingConstants.CENTER);
        charMapJTable.setDefaultRenderer(Object.class, defaultTableCellRenderer);
    }
}
